<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <link rel="stylesheet" type="text/css" href="mycourse/css/modern-norm.min.css"/>
    <link rel="stylesheet" type="text/css" href="mycourse/css/prism.min.css "/>
    <link rel="stylesheet" type="text/css" href="mycourse/css/katex.min.css "/>
    <link rel="stylesheet" type="text/css" href="mycourse/css/wolai.css "/>
    <script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
    <link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
    <link href="mycourse/css/mytable.css" rel="stylesheet" type="text/css">
    <%--  表格美化--%>
    <link rel="stylesheet" type="text/css" href="mycourse/css/sousuokuang.css"/>
    <%--  搜索框的美化--%>
    <script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>

    <title>${title}</title>
    <link rel="shortcut icon" href="https://api.wolai.com/v1/icon?type=1&locale=cn&pro=0&color=red"/>
</head>
<body class="small-font">
<header>
    <div class="image has"
         style="background-position-y: 50%; background-image: url('mycourse/img/hunian.jpg')"></div>
    <div class="title">
        <div class="banner">
            <div class="icon icon-image"
                 style="background-image: url('https://api.wolai.com/v1/icon?type=1&locale=cn&pro=0&color=red')"></div>
        </div>
        <div data-title="${title}" class="main-title"></div>
    </div>

  <div class="logout-button-container">
    <form action="logout" method="POST">
      <button type="submit" class="logout-button">退出登录</button>
    </form>
  </div>
</header>


<div class="centered-form">
    <form action="queryCourse" method="GET">
        <input type="text" name="query" placeholder="搜索查询课程">
        <button type="submit">搜索</button>
    </form>
</div>


<div class="container">
    <table class="course-table">
        <thead>
        <tr>
            <th>ID</th>
            <th>课程信息</th>
            <th>周次</th>
            <th>开始节次</th>
            <th>结束节次</th>

            <th>周几</th>
            <th>日期</th>
            <th>教师</th>
            <th>地点</th>

            <th>编辑</th>
            <th>删除</th>
            <th>增加</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${courseArrayList}" var="i" varStatus="st">
            <tr>
                <td>${i.id}</td>
                <td>${i.courseInfo}</td>
                <td>${i.week}</td>

                <td>${i.lessonStart}</td>
                <td>${i.lessonEnd}</td>

                <td>${i.day_of_week}</td>
                <td>${i.date}</td>
                <td>${i.teacher}</td>
                <td>${i.place}</td>

                <td><a href="editCourse?id=${i.id}">编辑</a></td>
                <td><a href="deleteCourse?id=${i.id}">删除</a></td>
                <td><a href="addCourse.html">增加</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>

<nav>
    <ul class="pager">
        <li><a href="index?start=0">首 页</a></li>
        <li><a href="index?start=${pre}">上一页</a></li>
        <li><a href="index?start=${next}">下一页</a></li>
        <li><a href="index?start=${last}">末 页</a></li>
    </ul>
</nav>


<hr>
<p style="text-align: center">当前在线人数：${online_number}</p>

</body>
</html>
